<!DOCTYPE html >
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8" />
    <title>ITArmy后台管理</title>
    <link rel="icon" type="image/x-icon" href="/static/images/logoIcon.icon">
    <link rel="stylesheet" href="/static/css/blog.css">
</head>
<body>
<!-- 头部导航条 -->
<div id="nav">
    <div class="heard">
        <div class="logo">
            <p>ITArmy后台管理</p>
        </div>
        <a href="/user/sign" class="signout">退出</a>
        <a href="/user/index" class="signout">主页</a>
    </div>

</div>
<!-- 侧边栏 -->
<div id="aside">
    <div class="menu">
        <ul>
            <li class="active">
                <a href="/admin/Blog/list">博客管理&nbsp;<img src="/static/images/blog.svg" /></a>
            </li>
            <li>
                <a href="/admin/Type/list">博客类型&nbsp;<img src="/static/images/kind.svg"/></a>
            </li>
            <li>
                <a href="/admin/Serialize/list">连载管理&nbsp;<img src="/static/images/stroy.svg" /></a>
            </li>
            <li>
                <a href="/admin/Order/list">订单管理&nbsp;<img src="/static/images/order.svg" /></a>
            </li>
            <li>
                <a href="/admin/User/list">用户管理&nbsp;<img src="/static/images/user.svg" alt="" /></a>
            </li>
            <li>
                <a href="/admin/Question/list">问题管理&nbsp;<img src="/static/images/question.svg" /></a>
            </li>
            <li>
                <a href="/admin/Exchange/list">汇率管理&nbsp;<img src="/static/images/rate.svg" alt="" /></a>
            </li>
            <li>
                <a href="/admin/ContributeAudit/list">投稿审核&nbsp;<img src="/static/images/word.svg"></a>
            </li>
        </ul>
    </div>
</div>
<div class="fill">
    <table class="table table-bordered">
        <thead class="heard">
        <tr>
            <th>博客批次列表</th>
        </tr>
        </thead>
        <tbody>
        <tr>
            <td class="we">
                <div id="remove" style="margin:12px 10px;">
                    <a class="delatemore" href="javascript:;">
                        <img src="/static/images/rubsh.svg">
                        <span>批量删除</span>
                    </a>
                </div>
                <form class="navbar-form navbar-left" role="search" >
                    筛选:<input type="text" id="search" placeholder="搜索博客标题">
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <input type="text" id="look" placeholder="根据博客类型搜索">
                    <input type="button" id="lookfor" value="查询">
                    <input type="button" id="back" value="返回">
                </form>
            </td>
        </tr>
        </tbody>
    </table>

    <div class="through">
        <table id="employeeTable">
            <thead>
                <tr style="background-color: #F5FAFA">
                    <th class="switch">
                        <input type="checkbox" id="check">
                    </th>
                    <th>Id名</th>
                    <th>用户名</th>
                    <th>博客标题</th>
                    <th>博客类型</th>
                    <th style="width: 170px;">发布时间</th>
                    <th>点赞量</th>
                    <th>收藏量</th>
                    <th>阅读量</th>
                    <th>打赏金额</th>
                    <th>评论量</th>
                    <th>字数</th>
                    <th>状态</th>
                    <th class="do">推荐</th>
                    <th class="do">操作</th>
                </tr>
            </thead>
            <tbody>
                <tr th:each="Blog:${blogList.list}">
                    <td class="switch"><input type="checkbox" name="user"></td>
                    <td th:text="${Blog.bId}"></td>
                    <td th:text="${Blog.uId}"></td>
                    <td th:text="${Blog.bTitle}"></td>
                    <td th:text="${Blog.tId}"></td>
                    <td th:text="${#dates.format(Blog.bTime,'yyyy-MM-dd HH:mm:ss')}"></td>
                    <td th:text="${Blog.bPraise}"></td>
                    <td th:text="${Blog.bCollection}"></td>
                    <td th:text="${Blog.bRead}"></td>
                    <td th:text="${Blog.bReward}"></td>
                    <td th:text="${Blog.bComment}"></td>
                    <td th:text="${Blog.bWord}"></td>
                    <td th:text="${Blog.bRecommend}" style="color:red;"></td>
                    <td>
                        <button class="detail">推荐</button>
                        <button class="nodetail">不推荐</button>
                    </td>
                    <td class="itemDelete">
                        <button class="delate">删除</button>
                        <button th:href="@{/admin/Blog/edit?(id=${Blog.bId})}" class="compiler">编辑</button>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>

    <div class="page" th:if="${blogList.pages>0}"><!--分页-->
        <ul class="pageUl">
            <li class="pageLi"><a th:href="@{'/admin/Blog/list?page=1'}">首页</a></li>
            <li class="pageLi" th:if="${blogList.pageNum-3 >=1}"><a th:href="@{'/admin/Blog/list?page=' + ${blogList.pageNum-3}}" th:text="${blogList.pageNum -3}" >1</a></li>
            <li class="pageLi" th:if="${blogList.pageNum-2 >=1}"><a th:href="@{'/admin/Blog/list?page=' + ${blogList.pageNum-2}}" th:text="${blogList.pageNum -2}" >1</a></li>
            <li class="pageLi" th:if="${blogList.pageNum-1 >=1}"><a th:href="@{'/admin/Blog/list?page=' + ${blogList.pageNum-1}}" th:text="${blogList.pageNum -1}" >1</a></li>
            <li class="pageLi active1"><a th:href="@{'/admin/Blog/list?page=' + ${blogList.pageNum}}" th:text="${blogList.pageNum}" ></a></li>
            <li th:if="${blogList.pageNum+1} <= ${blogList.pages}" ><a th:href="@{'/admin/Blog/list?page=' + ${blogList.pageNum+1}}" th:text="${blogList.pageNum +1}" >1</a></li>
            <li th:if="${blogList.pageNum+2} <= ${blogList.pages}" ><a th:href="@{'/admin/Blog/list?page=' + ${blogList.pageNum+2}}" th:text="${blogList.pageNum +2}" >1</a></li>
            <li th:if="${blogList.pageNum+3} <= ${blogList.pages}" ><a th:href="@{'/admin/Blog/list?page=' + ${blogList.pageNum+3}}" th:text="${blogList.pageNum +3}" >1</a></li>
            <li th:class="${blogList.pageNum == blogList.pages}?'disabled' : ''" ><a th:href="@{'/admin/Blog/list?page=' + ${blogList.pageNum+1}}">下一页</a></li>
        </ul>
    </div>

    <!--编辑的模态框-->
    <div class="modal movefade movemodal" id="movemodal">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <i>X</i>
                    <h4>博客管理</h4>
                </div>
                <div class="modal-body">
                    <p>
                        ID名称：<input type="text" id="id">
                    </p>
                    <p>
                        用户名称：<input type="text" id="user">
                    </p>
                    <p>
                        博客标题：<input type="text" id="title">
                    </p>
                    <p>
                        博客类型:<input type="text" id="type">
                    </p>
                    <p>
                        <input type="hidden" id="love">
                    </p>
                    <p>
                        点赞量:<input type="text" id="commit">
                    </p>
                    <p>
                        收藏量:<input type="text" id="collection">
                    </p>
                    <p>
                        阅读量:<input type="text" id="read">
                    </p>
                    <p>
                        打赏金额:<input type="text" id="money">
                    </p>
                    <p>
                        评论量:<input type="text" id="price">
                    </p>
                    <p>
                        字数:<input type="text" id="word">
                    </p>
                </div>
                <div class="modal-footer">
                    <button class="same addbtn_ok">确定</button>
                    <button class="same addbtn_no">取消</button>
                </div>
            </div>
        </div>
    </div>

</div>
</body>

<script src="/static/js/jquery-3.3.1.min.js"></script>
<script src="/static/js/blog.js"></script>
</html>